package org.zjvis.datascience.common.widget.vo;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.List;

/**
 * @description TODO
 * @date 2022/1/21
 */
@Data
@AllArgsConstructor
public class DashboardTriggerResultVO {

    private Boolean flag;

    private List<Long> affectedIds;

    public DashboardTriggerResultVO(Boolean flag){
        this.setFlag(flag);
        this.setAffectedIds(null);
    }

    public static DashboardTriggerResultVO fail() {
        return new DashboardTriggerResultVO(false);
    }

    public static DashboardTriggerResultVO ok(List<Long> affectedIds) {
        return new DashboardTriggerResultVO(true, affectedIds);
    }
}
